<?php

namespace app\admin\model\checkin;

use think\Model;

/**
 * Record
 */
class Record extends Model
{
    // 表名
    protected $name = 'checkin_record';

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = true;

    // 字段类型转换
    protected $type = [
        'checkin_time' => 'timestamp:Y-m-d H:i:s',
    ];


    public function user(): \think\model\relation\BelongsTo
    {
        return $this->belongsTo(\app\admin\model\User::class, 'user_id', 'id');
    }
}